<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<title></title>
<base href="<%=basePath%>">
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css"
	href="bootstrap-rs/Css/bootstrap.css" />
<link rel="stylesheet" type="text/css"
	href="bootstrap-rs/Css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css"
	href="bootstrap-rs/Csts/style.css" />
<script type="text/javascript" src="bootstrap-rs/Js/jquery.js"></script>
<script type="text/javascript" src="bootstrap-rs/Js/jquery.sorted.js"></script>
<script type="text/javascript" src="bootstrap-rs/Js/bootstrap.js"></script>
<script type="text/javascript" src="bootstrap-rs/Js/ckform.js"></script>
<script type="text/javascript" src="bootstrap-rs/Js/common.js"></script>



<style type="text/css">
body {
	padding-bottom: 40px;
}

.sidebar-nav {
	padding: 9px 0;
}

@media ( max-width : 980px) {
	/* Enable use of floated navbar text */
	.navbar-text.pull-right {
		float: none;
		padding-left: 5px;
		padding-right: 5px;
	}
}
</style>
</head>
<body>
	<form class="form-inline definewidth m20" action="sys/user/query"
		id="pager" method="post">
		<input type="text" name="message" class="abc input-default"
			placeholder="账号/姓名查询" value="${message }">&nbsp;&nbsp;
		<!-- 分页相关的属性 -->
		<input type="hidden" name="pageSize" id="pageSize"
			value="${pageModel.pageSize }"> <input type="hidden"
			name="pageNum" id="pageNum" value="${pageModel.pageNum }">

		<button type="submit" class="btn btn-primary">查询</button>
		&nbsp;&nbsp;<a
					href="sys/user/insert">新增</a>
	</form>
	<table class="table table-bordered table-hover definewidth m10">
		<thead>
			<tr>
				<th>用户id</th>
				<th>用户名</th>
				<th>真实姓名</th>
				<th>性别</th>
				<th>籍贯</th>
				<th>身份证</th>
				<th>电话号码</th>
				<th>手机号码</th>
				<th>邮箱</th>
				<th>操作</th>
			</tr>
		</thead>
		<c:forEach items="${user}" var="user">
			<tr>
				<td>${user.nUserid }</td>
				<td>${user.vUsername }</td>
				<td>${user.vRealname }</td>
				<td>${user.vSex }</td>
				<td>${user.vBirthplace }</td>
				<td>${user.vIndetification }</td>
				<td>${user.nMobile }</td>
				<td>${user.nTelphone }</td>
				<td>${user.vEmail }</td>

				<td><a href="sys/user/updateData?id=${user.nUserid }">修改</a>  <a
					href="sys/user/deleteData?id=${user.nUserid }">删除</a></td>
			</tr>
		</c:forEach>

	</table>
	<div class="inline pull-right page">
		<!-- 在这里   base 没有作用 -->
		<jsp:include page="/pageBar.jsp"></jsp:include>
	</div>
</body>
</html>
<script>
	$(function() {

		$('#addnew').click(function() {

			window.location.href = "sys/user/addData";
		});

	});

	function del(id) {

		if (confirm("确定要删除吗？")) {

			var url = "index.html";

			window.location.href = url;

		}

	}
</script>